Changing the name of a widget does not just change the current widget's
path, but also the path of all its children.
g_free (priv->name);
priv->name = new_name;
- if (priv->path)
- {
- guint pos;
-
- pos = gtk_widget_path_length (priv->path) - 1;
- gtk_widget_path_iter_set_name (priv->path, pos,
- priv->name);
- }
-
- if (priv->context)
- gtk_style_context_set_path (priv->context, priv->path);
+ gtk_widget_reset_style (widget);
g_object_notify (G_OBJECT (widget), "name");
}